/*
* SyncWaterfallHook 瀑布钩子,上一个监听函数的返回值，作为下一个监听函数的参数，像瀑布一样传递参数
*/
const { SyncWaterfallHook } = require('../real-tapable');
// const { SyncWaterfallHook } = require('tapable');

class Test {
    hooks = {
        arch: new SyncWaterfallHook(['arg1'])
    }
}
const test = new Test();
test.hooks.arch.tap('yxfan', (say) => {
    console.log(say, ': yxfan');
    return 'yxfan ok'
})
test.hooks.arch.tap('cheney', (data) => {
    console.log(data);
    return 'cheney ok'

})
test.hooks.arch.tap('xiaopa', (data) => {
    console.log(data);
})

test.hooks.arch.call('hello')
